package com.project.service;

import com.project.entity.InternInfo;
import com.project.myBeans.InternInfoDetail;
import com.project.myBeans.InternReportEntity;

import java.io.IOException;
import java.util.List;

/**
 * @Author: TateBrown
 * @date: 2018/5/26 13:52
 * @param:
 * @return:
 */
public interface InternInfoService {
    InternInfo findById(int id);
    int modify(InternInfo internInfo) throws IOException;
    int add(InternInfo internInfo) throws IOException;
    int delete(int id);
    List<InternInfo> findall();

    /**
     * author: WheelChen
     * date: 2017-5-15
     * function: 按条件查询实习信息
     * @param internInfo
     * @return
     */
    List<InternInfo> findByCondition(InternInfo internInfo);
    /**
     * author: WheelChen
     * date: 2017/6/30
     * function: 查找实习详细信息
     *
     * @param id
     * @return
     */
    InternInfoDetail findDetailById(Integer id) throws Exception;

    /**
     * author: WheelChen
     * date: 2017/7/27
     * function: 根据实习生id(sno)和实习单位类别查找实习信息
     *
     * @param internInfo
     * @return
     */
    InternInfo findOneBySnoAndOragattr(InternInfo internInfo);

    /**
     * author: WheelChen
     * date: 2017/8/3
     * function: 查找审核中的实习信息
     *
     * @param internInfo
     * @return
     */
    InternInfo findOneBySnoAndReview(InternInfo internInfo);

    /**
     * author: WheelChen
     * date: 2017/8/9
     * function: 判断是否处于审核流程中
     *
     * @param internInfo
     * @return ture - 处于 false - 不处于
     */
    boolean checkIsUnderReview(InternInfo internInfo);

    /**
     * author: WheelChen
     * date: 2017/9/19
     * function: 根据实习生idList批量删除
     *
     * @param snoList
     * @return
     */
    int removeBatchBySnoList(List snoList);

    /**
     * 根据用户idList查找实习安排表
     * @param userIds
     * @return
     */
    List<InternReportEntity> findBatchByUserIds(List<Integer> userIds);
}
